import { createStore } from 'vuex'
export default createStore({
  state () {
    return {
      username: '',
      password: '',
      token: ''
    }
  },
  mutations: {
    setloginData (state, data) {
      state.username = data.username
      state.password = data.password
    },
    settokenData (state, data) {
        state.token = data
    }
  },
  actions: {
    updateCommonData ({ commit }, data) {
      commit('setCommonData', data)
    }
  }
})
